/// @Classname : HcDividerPage
/// @Author : 
/// @Time : 2023-09-20 17:20
/// @Description : //todo

import 'package:flutter/material.dart';
import 'package:hc_ui/widget/divider/hc_divider.dart';
import 'package:hc_ui/widget/title/hc_title.dart';

class HcDividerPage extends StatefulWidget {
  const HcDividerPage({Key? key}) : super(key: key);

  @override
  State<HcDividerPage> createState() => _HcDividerPageState();
}

class _HcDividerPageState extends State<HcDividerPage> {
  @override
  Widget build(BuildContext context) {
    return  Scaffold(
      appBar: AppBar(
        title: const Text("HcProgressPage"),
      ),
      body: ListView(children: [
        HcTitle.dot(title: "横向实线分隔符"),
        HcDivider(
          decoration: Axis.horizontal,
          color: Colors.blue,
          thickness: 1,
        ),
        HcTitle.dot(title: "横向增加宽度分隔符"),
        Container(
          color: Colors.grey,
          child: HcDivider(
            decoration: Axis.horizontal,
            color: Colors.blue,
            spacing: 8,
            thickness: 1,
          ),
        ),
        HcTitle.dot(title: "横向增加距离起始位置的分隔符"),
        HcDivider(
          decoration: Axis.horizontal,
          color: Colors.blue,
          thickness: 1,
          indent: 18,
          endIndent: 18,
        ),
        HcTitle.dot(title: "横向虚线 修改颜色"),
        HcDivider(
          decoration: Axis.horizontal,
          color: Colors.purple,
          style: HcDividerStyle.dashed,
          thickness: 1,
        ),
        HcTitle.dot(title: "纵向虚线 显示不同数量"),

        SizedBox(
          height: 120,
          child: Row(
            children: [
              Expanded(
                child: HcDivider(
                  decoration: Axis.vertical,
                  color: Colors.blue,
                  style: HcDividerStyle.dashed,
                  thickness: 1,
                  // indent: 8,
                  // endIndent: 8,
                ),
              ),
              Expanded(
                child: HcDivider(
                  decoration: Axis.vertical,
                  color: Colors.blue,
                  style: HcDividerStyle.dashed,
                  thickness: 1,
                  dashedCounts: 10,
                  // indent: 8,
                  // endIndent: 8,
                ),
              ),
              Expanded(
                child: HcDivider(
                  decoration: Axis.vertical,
                  color: Colors.blue,
                  style: HcDividerStyle.dashed,
                  thickness: 1,
                  dashedCounts: 5,
                  // indent: 8,
                  // endIndent: 8,
                ),
              ),
            ],
          ),
        )

      ]),

// This trailing comma makes auto-formatting nicer for build methods.
    );
  }
}